import instance from "@/util/request";

// 查询教师选项列表
export function optionTeacher(){
    return instance({
        url:'/teacher/list',
        method:'get'
    })
}

// 查询教师分页列表
export function listTeacher(params){
    return instance({
        url:'/teacher/page',
        method:'get',
        params
    })
}

// 添加教师
export function addTeacher(data){
    return instance({
        url:'/teacher/add',
        method:'post',
        data
    })
}

// 修改教师信息
export function editTeacher(data){
    return instance({
        url:'/teacher/update',
        method:'put',
        data
    })
}


// 删除教师
export function removeTeacher(id){
    return instance({
        url:`/teacher/delete/${id}`,
        method:'put'
    })
}


// 根据loginId获取teacherId
export function getTeacherId(userId){
    return instance({
        url:`/teacher/get/id/${userId}`,
        method:'get'
    })
}